<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.etc.myblog.entity.User"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>

<title>个人资料</title>

<meta http-equiv="Content-Language" content="zh-CN" />
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/jquery1.4.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/dyfrom.js"></script>
<meta name="Keywords" content="个人信息修改" />
<meta name="Description" content="个人信息修改" />
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/resource/css/tzjg_write.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/resource/js/tzjg_write.js"></script>
</head>

<body>
	<%
		User user = (User)session.getAttribute("user");
	%>

	<jsp:include page="../inc/head_nav.jsp" />
	
	<div class="hr tp-div-nexthr"
		style="margin-top: 0;margin-bottom: 0;padding: 0;"></div>
	<div class="container pb-15">
		<!-- Example row of columns -->
		<div class="row">
			<div class="span12">

				<!--内容页面-->

				<div class="label-div b-30 border-all pt-5 t-20"
					style="position: relative; padding-left: 0;">
					<div class="txmd">
						<h4 class="mmh4">个人资料修改页面</h4>
						<form id="submodifyform" enctype="multipart/form-data"  action="${pageContext.request.contextPath}/UserSer?tag=modify&&userId=${userEdit.userId}" method="post" >
							<div class="basic">请认真填写以下内容</div>
							<!-- 验证用户名 -->
							<div class="control-group">
								<label class="control-label" for="inputName">用户名
									<p class="text-error">你的账号</p>
								</label>
								<div class="controls">
									<input id="inputName_Read" type="text" name="username_Read"
										value="<%=user.getUserName() %>" placeholder="" class="input-xlarge placeholder on"
										maxlength="10" rel="input-text" readonly> <span
										class="help-inline"></span>
								</div>
								<div class="mmclear"></div>


								<!-- 修改真实姓名 -->
								<div class="control-group">
									<label class="control-label" for="inputRealName">真实姓名
										<p class="text-error">必填项</p>
									</label>
									<div class="controls">
										<input id="inputRealName" type="text" name="realname"
											placeholder="你的真实姓名" class="input-xlarge placeholder on"
											maxlength="10" rel="input-text" value="${userEdit.userRealName!=null?userEdit.userRealName:null}"> <span
											class="help-inline"></span>
									</div>
									<div class="mmclear"></div>
								</div>
								<!-- 修改性别 -->
								<div class="control-group">
									<label class="control-label" for="inputSex1">性别：
										<p class="text-error">必填项</p>
									</label>
									<div class="controls">
										<c:choose>
										<c:when test="${userEdit.userSex.equals('男')}">
											男 <input id="inputSex1" type="radio" name="usersex" value="男" checked="checked">
											女 <input id="inputSex2" type="radio" name="usersex" value="女">
										</c:when>
										<c:otherwise>
											男 <input id="inputSex1" type="radio" name="usersex" value="男">
											女 <input id="inputSex2" type="radio" name="usersex" value="女" checked="checked">
										</c:otherwise>
										</c:choose>
										<span class="help-inline"></span>
									</div>
									<div class="mmclear"></div>
								</div>

								<!-- 电话修改 -->
								<div class="control-group">
									<label class="control-label" for="inputPhone">电话
										<p class="text-error">必填项</p>
									</label>

									<div class="controls">
										<input type="text" id="inputPhone" name="phone"
											placeholder="你的手机号码" maxlength="30" rel="input-phone"
											class="input-xlarge placeholder on" value="${userEdit.userPhone!=null?userEdit.userPhone:null }"> <span
											class="help-inline"></span>
									</div>
									<div class="mmclear"></div>
								</div>

								<!-- 邮箱地址修改 -->
								<div class="control-group">
									<label class="control-label" for="inputEmail">E-mail
										<p class="text-error">必填项</p>
									</label>

									<div class="controls">
										<input id="inputEmail" type="text" placeholder="你的常用邮箱"
										    name="email" class="input-xlarge placeholder on"
											rel="input-email" value="${userEdit.userEmail!=null?userEdit.userEmail:null }"> <span class="help-inline"></span>
									</div>
									<div class="mmclear"></div>
								</div>

								<!-- 选择职业 -->
							<div class="control-group">
								<label class="control-label" for="avatarUpload">选择职业
									<p class="text-error">可选项</p>
								</label>
								<div class="controls">
									<div id="avatarUpload">
										 <span
											class="help-inline"></span>
									</div>
						<select id="selType" style="height:30px;width:120px" name="positionId">
								<option value="1">请选择分类</option>
								<c:forEach items="${posList}" var="pos" >
									<c:choose>
									<c:when test="${userEdit.position.positionId == pos.positionId}">
										<option value="${pos.positionId}" selected="selected">${pos.positionName}</option>
									</c:when>
									<c:otherwise>
										<option value="${pos.positionId}">${pos.positionName}</option>
									</c:otherwise>
									</c:choose>
								</c:forEach>
						</select>
								</div>
								<div class="mmclear"></div>
							</div>
							
								<!-- 常住地址 -->
								<div class="control-group ">
									<label class="control-label" for="inputAddress">常住地址
										<p class="text-error">可选填项</p>
									</label>
									<div class="controls">
										<input id="inputAddress" name="address" type="text"
											class="input-xlarge on placeholder" maxlength="100"
											placeholder="你的居住地" rel="input-url" value="${userEdit.userAddress!=null?userEdit.userAddress:null }"> <span
											class="help-inline"></span>
									</div>
									<div class="mmclear"></div>
								</div>

								<!-- 出生日期修改 -->
								<div class="control-group ">
									<label for="inputLaunchTime" class="control-label">出生日期
										<p class="text-error">可选项</p>
									</label>
									<div class="controls">
										<link rel="stylesheet" type="text/css"
											href="${pageContext.request.contextPath}/resource/js/calendar/jscal2.css" />
										<link rel="stylesheet" type="text/css"
											href="${pageContext.request.contextPath}/resource/js/calendar/border-radius.css" />
										<link rel="stylesheet" type="text/css"
											href="${pageContext.request.contextPath}/resource/js/calendar/win2k.css" />
										<script type="text/javascript"
											src="${pageContext.request.contextPath}/resource/js/calendar/calendar.js"></script>
										<script type="text/javascript"
											src="${pageContext.request.contextPath}/resource/js/calendar/lang/en.js"></script>
										<input type="text" class="input-xlarge on datepicker" name="birthday"
											rel="input-text" id="productdate" placeholder="你的出生日期" value="${userEdit.userBirthday!=null?userEdit.getStringBirthday():null }">
										<script type="text/javascript">
											Calendar.setup({
												weekNumbers : true,
												inputField : "productdate",
												trigger : "productdate",
												dateFormat : "%Y-%m-%d",
												showTime : false,
												minuteStep : 1,
												onSelect : function() {
													this.hide();
												}
											});
										</script>
										<span class="help-inline"></span>
									</div>
									<div class="mmclear"></div>
								</div>
								<div class="mmclear"></div>
							</div>



							<!-- 上传头像 -->
							<div class="control-group">
								<label class="control-label" for="avatarUpload">上传头像
									<p class="text-error">可选项</p>
								</label>
								<div class="controls">
									<div id="avatarUpload">
										 <span
											class="help-inline"></span>
									</div>
									<input type="file" id="mmupjt" name="file"
										/> <span class="help-block" style="color: red;">
										请上传jpg/jpeg/png/gif格式文件，文件小于1MB </span>
								</div>
								<div class="mmclear"></div>
							</div>
							
							
							

							<!--个人简述 -->
							<div class="control-group ">
								<label class="control-label" for="textAbstract">个人简述
									<p class="text-error">可选项</p>
								</label>
								<div class="controls">
									<textarea id="textAbstract_noError" name="desc"
										placeholder="你的个人介绍，建议大于100字。介绍的越详细，越容易得到网友关注哦。" rows="4"
										rel="text-area">${userEdit.userDesc!=null?userEdit.userDesc:null }
                    				</textarea>
									<span class="help-inline"></span>
								</div>
								<div class="mmclear"></div>
							</div>
						</form>
					</div>
					<div class="basic"
						style="border-top:1px solid #ccc; text-align:right; margin-left:15px; padding:10px 0px 5px 0px;">
						<input type="image" src="${pageContext.request.contextPath}/resource/images/blutbottom.jpg" value=""
							style="width:81px; height:46px;" onclick="document.getElementById('submodifyform').submit()" />
					</div>
					<div class="mmclear"></div>
				</div>
			</div>
		</div>
		<!-- class="row"的div标签结束 -->
	</div>
	<!-- class="container pb-15"的div标签结束 -->
	<jsp:include page="../inc/footer_nav.jsp"></jsp:include>

	<script type="text/javascript">
		//回到顶部
		backToTop('body');
	</script>

	<a class="backToTop" href="javascript:void(0);" title="返回顶部"
		style="display: none;"></a>
</body>
</html>
